package com.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.dto.OrderQuotaAggeDTO;
import com.sky.dto.OrderReportAggrDTO;
import com.sky.dto.OrdersAggrDataDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @BelongsProject: sky-take-out
 * @Author: XieMingHui
 * @CreateTime: 2023-11-22  09:42
 * @Description: 数据统计dao层
 * @Version: 1.0
 */
@Mapper
public interface AggrDataDTOMapper extends BaseMapper<OrdersAggrDataDTO> {
    @Select("select create_time from sky_take_out.user where create_time <= #{endTime}")
    public List<LocalDate> totalUserList(LocalDate endTime);

    public List<OrdersAggrDataDTO> dataAggr(LocalDate beginTime, LocalDate endTime, Integer status);

    public List<OrderQuotaAggeDTO> dataQuotaAggr(LocalDate beginTime, LocalDate endTime, Integer status);

    public List<OrderReportAggrDTO> dataOrderAggr(LocalDate beginTime, LocalDate endTime);

}
